package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class PlayerMicroformatRenderer implements Sequenceable, Serializable {

    @SerializedName("thumbnail")
    private Thumbnail thumbnail;

    @SerializedName("externalChannelId")
    private String externalChannelId;

    @SerializedName("publishDate")
    private String publishDate;

    @SerializedName("description")
    private Description description;

    @SerializedName("lengthSeconds")
    private String lengthSeconds;

    @SerializedName("title")
    private Title title;

    @SerializedName("hasYpcMetadata")
    private boolean isHasYpcMetadata;

    @SerializedName("ownerChannelName")
    private String ownerChannelName;

    @SerializedName("uploadDate")
    private String uploadDate;

    @SerializedName("ownerProfileUrl")
    private String ownerProfileUrl;

    @SerializedName("isUnlisted")
    private boolean isIsUnlisted;

    @SerializedName("embed")
    private Embed embed;

    @SerializedName("viewCount")
    private String viewCount;

    @SerializedName("category")
    private String category;

    @SerializedName("isFamilySafe")
    private boolean isIsFamilySafe;


    public static final Sequenceable.Producer<PlayerMicroformatRenderer> CREATOR = new Producer<PlayerMicroformatRenderer>() {
        @Override
        public PlayerMicroformatRenderer createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            PlayerMicroformatRenderer playerMicroformatRenderer = new PlayerMicroformatRenderer();
            playerMicroformatRenderer.unmarshalling(parcel);
            return playerMicroformatRenderer;
        }
    };


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.thumbnail);
        parcel.writeString(this.externalChannelId);
        parcel.writeString(this.publishDate);
        parcel.writeSequenceable(this.description);
        parcel.writeString(this.lengthSeconds);
        parcel.writeSequenceable(this.title);
        parcel.writeBoolean(this.isHasYpcMetadata);
        parcel.writeString(this.ownerChannelName);
        parcel.writeString(this.uploadDate);
        parcel.writeString(this.ownerProfileUrl);
        parcel.writeBoolean(this.isIsUnlisted);
        parcel.writeSequenceable(this.embed);
        parcel.writeString(this.viewCount);
        parcel.writeString(this.category);
        parcel.writeBoolean(this.isIsFamilySafe);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.thumbnail);
        this.externalChannelId=parcel.readString();
        this.publishDate=parcel.readString();
        parcel.readSequenceable(this.description);
        this.lengthSeconds=parcel.readString();
        parcel.readSequenceable(this.title);
        this.isHasYpcMetadata=parcel.readBoolean();
        this.ownerChannelName=parcel.readString();
        this.uploadDate=parcel.readString();
        this.ownerProfileUrl=parcel.readString();
        this.isIsUnlisted=parcel.readBoolean();
        parcel.readSequenceable(this.embed);
        this.viewCount=parcel.readString();
        this.category=parcel.readString();
        this.isIsFamilySafe=parcel.readBoolean();
        return true;
    }

    @Override
    public String toString() {
        return "PlayerMicroformatRenderer{" +
                "thumbnail=" + thumbnail +
                ", externalChannelId='" + externalChannelId + '\'' +
                ", publishDate='" + publishDate + '\'' +
                ", description=" + description +
                ", lengthSeconds='" + lengthSeconds + '\'' +
                ", title=" + title +
                ", isHasYpcMetadata=" + isHasYpcMetadata +
                ", ownerChannelName='" + ownerChannelName + '\'' +
                ", uploadDate='" + uploadDate + '\'' +
                ", ownerProfileUrl='" + ownerProfileUrl + '\'' +
                ", isIsUnlisted=" + isIsUnlisted +
                ", embed=" + embed +
                ", viewCount='" + viewCount + '\'' +
                ", category='" + category + '\'' +
                ", isIsFamilySafe=" + isIsFamilySafe +
                '}';
    }

    public Thumbnail getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(Thumbnail thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getExternalChannelId() {
        return externalChannelId;
    }

    public void setExternalChannelId(String externalChannelId) {
        this.externalChannelId = externalChannelId;
    }

    public String getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(String publishDate) {
        this.publishDate = publishDate;
    }

    public Description getDescription() {
        return description;
    }

    public void setDescription(Description description) {
        this.description = description;
    }

    public String getLengthSeconds() {
        return lengthSeconds;
    }

    public void setLengthSeconds(String lengthSeconds) {
        this.lengthSeconds = lengthSeconds;
    }

    public Title getTitle() {
        return title;
    }

    public void setTitle(Title title) {
        this.title = title;
    }

    public boolean isHasYpcMetadata() {
        return isHasYpcMetadata;
    }

    public void setHasYpcMetadata(boolean hasYpcMetadata) {
        isHasYpcMetadata = hasYpcMetadata;
    }

    public String getOwnerChannelName() {
        return ownerChannelName;
    }

    public void setOwnerChannelName(String ownerChannelName) {
        this.ownerChannelName = ownerChannelName;
    }

    public String getUploadDate() {
        return uploadDate;
    }

    public void setUploadDate(String uploadDate) {
        this.uploadDate = uploadDate;
    }

    public String getOwnerProfileUrl() {
        return ownerProfileUrl;
    }

    public void setOwnerProfileUrl(String ownerProfileUrl) {
        this.ownerProfileUrl = ownerProfileUrl;
    }

    public boolean isIsUnlisted() {
        return isIsUnlisted;
    }

    public void setIsUnlisted(boolean isUnlisted) {
        isIsUnlisted = isUnlisted;
    }

    public Embed getEmbed() {
        return embed;
    }

    public void setEmbed(Embed embed) {
        this.embed = embed;
    }

    public String getViewCount() {
        return viewCount;
    }

    public void setViewCount(String viewCount) {
        this.viewCount = viewCount;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public boolean isIsFamilySafe() {
        return isIsFamilySafe;
    }

    public void setIsFamilySafe(boolean isFamilySafe) {
        isIsFamilySafe = isFamilySafe;
    }
}
